

using System;
using System.Collections.Generic;
using System.Text;
using EntityLayer;
using System.Data;
using DataAccessLayer;

namespace DataLayer
{
	public class datArticleContentPublishLocations
	{
		public datArticleContentPublishLocations()
		{
		}
		
		#region  Code Factory Generated Methods
        public void InsertArticleContentPublishLocations(entArticleContentPublishLocations parEntArticleContentPublishLocations, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pArticleContentPublishLocationName", parEntArticleContentPublishLocations.ArticleContentPublishLocationName);
            insDbParamCollection.Add("@pArticleContentPublishLocationLink", parEntArticleContentPublishLocations.ArticleContentPublishLocationLink);
            insDbParamCollection.Add("@pArticleContentId", parEntArticleContentPublishLocations.ArticleContentId);
            insDbParamCollection.AddOutput("@pArticleContentPublishLocationId", DbType.Int32);
            parDbConnector.ExecuteNonQuery("InsertArticleContentPublishLocations", insDbParamCollection);
            parEntArticleContentPublishLocations.ArticleContentPublishLocationId = Convert.ToInt32(insDbParamCollection.GetOutPutParameter().Value);
        }
		#endregion
        public DataTable SelectArticleContentPublishLocationsByArticleContentId(entArticleContentPublishLocations parEntArticleContentPublishLocations, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pArticleContentId", parEntArticleContentPublishLocations.ArticleContentId);
            return parDbConnector.ExecuteDataTable("SelectArticleContentPublishLocationsByArticleContentId", insDbParamCollection);
        }
        public void DeleteArticleContentPublishLocationsByArticleContentId(entArticleContentPublishLocations parEntArticleContentPublishLocations, DbConnector parDbConnector)
        {
            DbParamCollection insDbParamCollection = new DbParamCollection();
            insDbParamCollection.Add("@pArticleContentId", parEntArticleContentPublishLocations.ArticleContentId);
            parDbConnector.ExecuteNonQuery("DeleteArticleContentPublishLocationsByArticleContentId", insDbParamCollection);
        }
	}
}